package edu.colorado.karl.intelsched;

/**
 * Class for creating and exchanging set points between the Long-Term database
 * and the Intelligent Scheduler
 * @author Andrew Boehm
 */

public class SPData {
	private Weather forecast;
	private Integer coldTankSetpoint;
	private Integer hotTankSetpoint;
	private Boolean heating;
	
	
	/**
	 * Creates an SPData containing info about the current weather and provides
	 * set points for use
	 * @param forecast A weather forecast for this set point time and date
	 * @param coldTankSetpoint The cold tank set point for this time and date
	 * @param hotTankSetpoint The hot tank set point for this time and date
	 * @param heating <code>true</code> if the hot tank set point has priority,
	 * <code>false</code> if the cold tank has priority.
	 */
	public SPData (Weather forecast, Integer coldTankSetpoint, 
					Integer hotTankSetpoint, Boolean heating) {
		this.forecast = forecast;
		this.coldTankSetpoint = coldTankSetpoint;
		this.hotTankSetpoint = hotTankSetpoint;
		this.heating = heating;
	}
	
	/**
	 * Gets the set point for the hot tank.
	 * @return The hot tank set point for this time and date
	 */
	public Integer getHotTankSetpoint() {
		return hotTankSetpoint;
	}

	/**
	 * Gets the set point for the cold tank.
	 * @return The cold tank set point for this time and date
	 */
	public Integer getColdTankSetpoint() {
		return coldTankSetpoint;
	}

	/**
	 * Gets the weather forecast corresponding to the set points in this class.
	 * @return A weather forecast for this set point time and date
	 */
	public Weather getForecast() {
		return forecast;
	}

	/**
	 * Returns which water tank's set point has priority.
	 * @return <code>true</code> if the hot tank set point has priority, 
	 * <code>false</code> if the cold tank has priority.
	 */
	public Boolean getHeating() {
		return heating;
	}
}
